package com.bee.bootstrap.roleResource.service;

import com.bee.bootstrap.resource.entity.Resource;
import com.bee.bootstrap.roleResource.entity.RoleResource;
import com.baomidou.mybatisplus.service.IService;
import com.bee.bootstrap.user.entity.User;
import com.bee.common.core.jsonview.DataView;
import com.bee.common.core.result.Result;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liekkas
 * @since 2018-05-25
 */
public interface IRoleResourceService extends IService<RoleResource> {

    Set<String> findResourcePermission(Long id);

    List<Resource> findResources(Long userId);

    Set<String> findResourceUrl(Long id);

    Result createRoleResource(RoleResource resource);

    DataView findDataView(Long resourceId, User user);

    List<RoleResource> findResourcesByRoleId(long id);

    boolean deleteResourceByRoleId(long roleId);

    Result createRoleResources(Long id, List<Resource> roleResources);
}
